Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Memory leak in ahocorasick #2258 #2518

Closed
wants to merge 5 commits into from
Closed

Fix Memory leak in ahocorasick #2258 #2518

wants to merge 5 commits into from

Conversation

pavlinux
Copy link

@pavlinux pavlinux commented Aug 5, 2024

Please sign (check) the below before submitting the Pull Request:

Link to the related issue:

Describe changes:

Fix Memory leak in ahocorasick #2258

Copy link

sonarcloud bot commented Aug 5, 2024

Copy link
Collaborator

@IvanNardi IvanNardi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pavlinux, thank you very much for working on this issue!
Could you please

==75==ERROR: AddressSanitizer: SEGV on unknown address 0x1001052ae2fb (pc 0x555921c54cc2 bp 0x7ffc295b19f0 sp 0x7ffc295b17c0 T0)
==75==The signal is caused by a READ memory access.
SCARINESS: 20 (wild-addr-read)
    #0 0x555921c54cc2 in ac_automata_add /src/ndpi/src/lib/third_party/src/ahocorasick.c:259:21
    #1 0x555921c50e88 in LLVMFuzzerTestOneInput /src/ndpi/fuzz/fuzz_ds_ahocorasick.cpp:88:11
  D:\a\nDPI\nDPI\src\lib\third_party\src\ahocorasick.c(229,31): error C2057: expected constant expression [D:\a\nDPI\nDPI\windows\nDPI.vcxproj]
  D:\a\nDPI\nDPI\src\lib\third_party\src\ahocorasick.c(229,31): error C2466: cannot allocate an array of constant size 0 [D:\a\nDPI\nDPI\windows\nDPI.vcxproj]
  D:\a\nDPI\nDPI\src\lib\third_party\src\ahocorasick.c(229,32): error C2133: 'rev': unknown size [D:\a\nDPI\nDPI\windows\nDPI.vcxproj]

@pavlinux pavlinux closed this Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants